package com.evil.application.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 应用权限表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_application_permission")
public class ApplicationPermission implements Serializable {

    /**
     * id
     */
    @TableId(value = "permission_id", type = IdType.AUTO)
    private Long permissionId;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 源类型(1：应用包, 2: 应用, 3: 应用组, 4: 流程节点处理人, 5: 流程节点待办转让, 6: 流程节点通知人)
     */
    @TableField(value = "source_type")
    private Integer sourceType;

    /**
     * 源id
     */
    @TableField(value = "source_id")
    private Long sourceId;

    /**
     * 权限类型(0:未知类型, 1: 用户, 2: 部门, 3: 角色)
     */
    @TableField(value = "permission_type")
    private Integer permissionType;

    /**
     * 密码
     */
    @TableField(value = "`password`")
    private String password;

    /**
     * 权限可见类型(0:可使用, 1:仅可见, 2-不可见)
     */
    @TableField(value = "visible")
    private Integer visible;

    /**
     * 目标id
     */
    @TableField(value = "target_id")
    private Long targetId;

    /**
     * 是否已删除(0:否, 1:是)
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 修改操作人
     */
    @TableField(value = "modifier_id")
    private Long modifierId;

    /**
     * 修改操作人名字
     */
    @TableField(value = "modifier_name")
    private String modifierName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;

    public static final String COL_PERMISSION_ID = "permission_id";

    public static final String COL_SOURCE_TYPE = "source_type";

    public static final String COL_SOURCE_ID = "source_id";

    public static final String COL_PERMISSION_TYPE = "permission_type";

    public static final String COL_PASSWORD = "password";

    public static final String COL_VISIBLE = "visible";

    public static final String COL_TARGET_ID = "target_id";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_MODIFIER_ID = "modifier_id";

    public static final String COL_MODIFIER_NAME = "modifier_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}